package pr.iceworld.fernando.springbatchquartzlearning.service;

import org.springframework.batch.item.ItemProcessor;
import org.springframework.stereotype.Component;
import pr.iceworld.fernando.springbatchquartzlearning.entity.Users;
import pr.iceworld.fernando.springbatchquartzlearning.repository.UserMapper;

import javax.annotation.Resource;

/**
 * Created by ferna on 2018/10/18.
 */
@Component
public class ProcessService implements ItemProcessor<Users, Users> {

    @Resource
    private UserMapper userMapper;

    @Override
    public Users process(Users user) throws Exception {
        user.setAge(50);
        System.out.println("ProcessService.process       -->  " + user);
        return user;
    }
}
